group

abstract fun group(blocks: List<DesignBlock>): DesignBlock

Group blocks together. The group becomes the blocks' new parent and takes the first block's parent as its own. Grouping does not change the children's positions: they stay relative to the group's parent, not to the group. In nested groups, they stay relative to the first ancestor that is not a group. The engine computes the group's position and size from the children's combined bounds. Moving the group moves all of its children by the same offset.

The blocks keep their times on the timeline. The group spans from the earliest start to the latest end of the blocks, and their time offsets become relative to the group.

Return

the block id of the created group.

Parameters

blocks

a non-empty array of block ids.